13. Shopping List Take 2

Shopping List Take 2

Question:

Start Quiz:

Solution:

INSTRUCTOR NOTE:

self.request.get_all()

self.request.get_all() is a function that returns a list of all values that belong to string that matches a key in our query parameter. For example, if we pass in these query parameters: mysite.com?food=chips&food=fruit&food=milk, then get_all() will return a list that contains the strings chips,food,milk

Jinja2 Templates

Note that the bracket and the percent sign needs to be next to each other such as:

{% keyword %}

AND NOT

{ % keyword % }

You can look up more documentation on Jinja2 here:

Jinja2 site